<?php
namespace Common\Controller;
use Think\Controller;
class UserController extends Controller {
  
    public function _initialize(){
        if (session('user_id')<1) {
        	$this->error('请登录后访问',U('home/user/loginform'));
        	exit;
        }
        $this->assign('layout',U('home/login/layout'));
        $this->assign('user_id',session('user_id'));
        $this->assign('username',session('username'));

    }








}